Modern enterprises typically rely on complex software applications to run their mission-critical processes, such as controlling and steering manufacturing machinery, operating network or web-based computing environments, or driving business processes with the help of an underlying IT infrastructure.
Monitoring such complex software applications is an important and difficult technical task in order to assure that the applications operate as desired. To this end, it may be desirable to collect monitoring data concerning the operation of the software application, so that the collected data can then be used to analyse, evaluate and control e.g. performance aspects, network bandwidth usage, or even exceptional runtime situations. However, typical software applications in place in many enterprises were not originally designed to provide monitorable data to monitoring products.
In the prior art, a number of approaches are known for extracting relevant data from an existing software application for monitoring, analysis and other purposes. This comprises e.g. debugging techniques such as disclosed in U.S. Pat. No. 6,598,181 B1 and US 2006/0041866 A1, legacy system analysis techniques such as disclosed in U.S. Pat. No. 6,836,780 B1 and US 2007/0245320 A1 or the analysis of business process performance such as disclosed in US 2008/0120153 A1 and US 2008/0219557 A1.
However, all known techniques have a drawback in that they rely in some way or the other on the software application under investigation to provide the relevant data to be monitored. Typically, the software application is required to use a dedicated application programming interface (API), so that data can be extracted from the application, or the data must be manually extracted from SQL or other databases. As a result, a common disadvantage of the known techniques is that the developer has to change the existing application in order for it to provide the desired data or the desired data must already exist in the application database or database interface. Therefore, older applications without special interfaces typically cannot provide relevant data with the state of the art technologies, at least not without substantial changes to the application code. In another field of technique, debugger and tracing tools are able to view and access application data, however, debugger and tracing tools do not provide the capability to automatically extract the data relevant for monitoring complex software applications.
It is therefore the technical problem underlying the present invention to provide an approach for monitoring software applications that at least partly overcomes the above explained disadvantages of the prior art.
This problem is according to one aspect of the invention solved by a runtime environment for non-invasive monitoring of software applications. In the embodiment of claim 1, the runtime environment is adapted for:    a. during execution of at least one software application within the runtime environment, identifying a function call to be executed by the at least one software application; and    b. generating monitoring data relating to the identified function call (25).
As it is known in the prior art, software applications may require after compilation a runtime environment to execute (e.g. an ABAP execution engine, a COBOL runtime, a JAVA virtual machine or a Natural runtime). A runtime environment can be understood as a “virtual processor” (CPU) on which a software application can be executed, wherein the runtime environment may provide additional libraries in order to emulate a physical computing system underlying the application. Typically, vendors of programming languages also provide suitable runtime environments to execute applications written in the respective language. For example, the C and C++ programming languages are typically designed to run on a physical processor (CPU), while the programming languages JAVA, C#, ABAP, COBOL and Natural are designed to run on a virtual processor, i.e. a runtime environment.
In this context, the present invention provides an enhanced runtime environment which allows for extracting relevant data for monitoring purposes in a non-invasive manner, i.e. without the need to change or otherwise adapt the software application under investigation. More precisely, when the software application is executed by the runtime environment, the software application typically executes a series of commands or function calls. The runtime environment of the invention identifies such function calls and generates monitoring data relating to the identified function call. Importantly, since the monitoring data is generated by the runtime environment itself, i.e. without the cooperation of the software application under investigation, the software application does not even have to be aware of the additional monitoring data generation. In particular, the software application does not have to be adapted in order to be monitored (“non-invasive monitoring”).
In one aspect of the present invention, the generating of monitoring data by the runtime environment may comprise generating runtime information from the group comprising: an identifier of the entity calling the at least one function call, an address of the entity calling the at least one function call, a timestamp and/or an identifier of the function call (e.g. the name of the function call). Accordingly, the generated monitoring data may be enriched with additional information such as runtime information, e.g. but not limited to: current date and time of the call and/or the user id of the caller. The additional information about the current state of the execution environment will allow a better detailed analysis later on. This aspect relates to a scenario where the identified function call does not comprise any function parameters (as opposed to the scenarios described further below). In this case, only the generated additional runtime information relating to the function call (which is preferably generated by an analytic engine; see further below) may be comprised in the monitoring data.
In another aspect of the invention, the function call may comprise at least one function parameter. In this case, the generating of monitoring data by the runtime environment may comprise generating a copy of the at least one function parameter, wherein the function parameter copy is usable for monitoring the at least one software application. Since the parameters of a function call are typically used to pass data between the individual functions of a software application (so-called data flow), this data, i.e. the respective copy thereof, can be used for monitoring the behavior and state of the software application. Advantageously, since the function parameters are copied by the runtime environment during execution of the software application, the software application is not aware of this data extraction and in particular, the existing application does not need to be changed. In yet another aspect of the present invention, also the monitoring data comprising the function parameter copy may be enriched with additional runtime information (see the scenario further above).
Preferably, the runtime environment is adapted for generating the function parameter copy before executing the function call. Accordingly, before the actual function call is executed, the relating function parameters (whose values are provided by the caller of the function) are copied in order to provide an unbiased copy of the function parameters for monitoring purposes.
In a particularly preferred embodiment of the runtime environment of the invention, the runtime environment is adapted for generating a second copy of the at least one function parameter after the function call has been executed, wherein the second function parameter copy is usable for identifying at least one function parameter that was changed and/or added during the execution of the function call. Accordingly, the runtime environment may copy the function parameters twice, i.e. a first time before the execution of the function call, and a second time thereafter. This way, any parameters/parameter values changed during the execution of the function call may be identified and made subject to monitoring. In summary, the monitoring data generated by the runtime environment may comprise runtime information (as explained further above), the function parameter copy generated before execution of the function call, the second function parameter copy generated after execution of the function call, or any combination thereof.
In one aspect of the invention, the runtime environment may be adapted for forwarding the generated monitoring data to an analytic engine for monitoring the at least one software application.
Additionally or alternatively, the runtime environment is further adapted for generating the monitoring data only if at least one predefined filter property is satisfied, wherein the at least one predefined filter property defines: an identifier of the function call, whether a specific function parameter is present in the function call and/or whether a specific function parameter has a predefined value. Accordingly, the generating of runtime information and/or the duplication of function parameter data can be controlled in the runtime environment by means of filter properties, in order to keep the overhead that may be introduced by the additional copy operations at a reasonable limit. Preferably, the above-described filtering is controlled by an analytic engine of the invention (see further below for a more detailed explanation of the analytic engine). Moreover, the analytic engine may also be in charge of generating the additional runtime information described further above, of removing unneeded function parameters from the output according to a predefined configuration, of concatenating function parameters (if needed) and/or of applying mathematical functions (such as add, sub, mul, div, . . . ) to the parameter values. Generally, it is preferably also a decision of the analytic engine whether the parameter(s) is/are useful according the filter criteria.
In other words, the analytic engine may be considered as the control unit of the present invention. The tasks of the analytic engine may be, among others, filtering function parameters, generating additional useful static parameters as well as dynamic parameters according the configuration, deleting unneeded parameters from the output, applying mathematical operations to the parameter values, concatenating string parameters, adding constant values, manipulating parameters according the configuration and/or changing parameter types for the output (e.g. “integer” may be cased to “double”).
As a simple example, a function call may have a string parameter “A” and a string parameter “B”. According the predefined configuration, the analytic engine will concatenate the parameters “A” and “B” to “C” and forward “C” to the output. The parameters “A” and “B” are according to the configuration unneeded and will not be forwarded to the output.
Furthermore, the runtime environment may be further adapted for copying at least one entry of a memory of an underlying computer system in which the at least one software application has written the at least one function parameter. Typically, during execution within the runtime environment, the software application stores its function parameters in the memory, which is required for the target, and the execution jumps to a new location in the same application or into a different application. At the new location, the data from the memory will be read and used for further processing. Similarly, after execution of the function call, the application typically stores new data in the memory as return value(s). Afterwards, the call instruction returns to the original location where it came from. At the next step the new data can be used for the further execution of the application. In the above aspect of the invention, the runtime environment reads the memory in order to obtain the copy/copies of the function parameter(s).
The present invention is also directed to a method for non-invasive monitoring of software applications, wherein the method comprises the following steps performed by a runtime environment: during execution of at least one software application within the runtime environment, identifying a function call to be executed by the at least one software application; and generating monitoring data relating to the identified function call. Further advantageous modifications of embodiments of the method of the invention are defined in further dependent claims.
Lastly, the present invention also provides a computer program comprising instructions for implementing any of the above described methods.